<%@ include file="../common/base.jsp" %>
<%@ page contentType= "text/html;charset=utf-8" %>
<%@ page language="java" import="com.octopus.optiworks.service.ConfigurationService"%>
<% boolean isAutoOperatorDate = ConfigurationService.getInstance().isAutoOpeartorDate() ; %>

<c:forEach var="step160Data" varStatus="status" items="${product.step160Datas}">
<c:if test="${not empty step160}">
<input type="hidden" name="id" value="<c:out value="${step160Data.id}" />">
<input type="hidden" name="product" value="<c:out value="${step160Data.product.id}" />">
<input type="hidden" name="className" value="com.octopus.optiworks.model.Step160Data">
<input type="hidden" name="step" value="step160">

<table width="100%">
	<tr>
		<td width="50%">
			<strong style="color:#A0A0FF">Step 160 Testing 封装后点测 (MPI: ZY-60-086)</strong>
		</td>
		<td width="25%">
			<strong style="color:#A0A0FF">测试用光源编号:
				<c:if test="${not empty step160Data.testLightCode}">
					<input type="text" name="testLightCode" value="<c:out value="${step160Data.testLightCode}" />">
				</c:if>
				<c:if test="${empty step160Data.testLightCode}">
					<input type="text" name="testLightCode" value="<c:out value="${currentUser.testLightCode}" />">
				</c:if>
			</strong>
		</td>
		<td width="25%">
			<strong style="color:#A0A0FF">测试用光功率编号:<input type="text" name="testLightPowerCode" value="<c:out value="${step160Data.testLightPowerCode}" />"></strong>
		</td>
	</tr>
</table>
<table rules="all" width="100%" bgcolor="#F0F0FF">
	<tr>
		<td align="center">
		</td>
		<td align="center">
			T-IL/PDL
		</td>
		<td align="center">
			R-IL-L/PDL
		</td>
		<td align="center">
			R-IL-R/PDL
		</td>
		<td align="center">
			Operator
		</td>
		<td align="center">
			Date
		</td>
	</tr>
	<tr>
		<td align="center">
			23度
		</td>
		<td align="center">
			<input type="text" name="tilPdl" value="<c:out value="${step160Data.tilPdl}" />">
		</td>
		<td align="center">
			<input type="text" name="rillPdl" value="<c:out value="${step160Data.rillPdl}" />">
		</td>
		<td align="center">
			<input type="text" name="rilrPdl" value="<c:out value="${step160Data.rilrPdl}" />">
		</td>		
		<% if(isAutoOperatorDate){ %>
		<td align="center">
			<c:out value="${step160Data.operator}" />
		</td>
		<td align="center">
			<fmt:formatDate  value="${step160Data.date}" pattern="yyyy-MM-dd HH:mm"/>
		</td>
		<% }else{ %>
		<td align="center">
			<select name="operator">
			<c:forEach var="user" items="${users}">
			<option value="<c:out value="${user.username}" />" 
			<c:if test="${(null==step160Data.operator && user.username==currentUser.username) || (null!=step160Data.operator && user.username==step160Data.operator)}">
			selected="selected"
			</c:if>
			><c:out value="${user.username}" /></option>
			</c:forEach>
			</select>
		</td>
		<td align="center">
			<input type="text" name="date" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" class="Wdate" style="width:130px" value="<fmt:formatDate  value="${step160Data.date}" pattern="yyyy-MM-dd HH:mm"/>">
		</td>
		<% } %>
	</tr>
</table>
<table width="100%" bgcolor="#F0F0FF">
	<tr>
		<td align="right">
			<fmt:message key="label.common.testresult" />
			<c:if test="${step160Data.testResult=='Spec' || empty step160Data.testResult}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_SPEC %>" checked><fmt:message key="label.common.specauto" />
			</c:if>
			<c:if test="${step160Data.testResult!='Spec' && not empty step160Data.testResult}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_SPEC %>" ><fmt:message key="label.common.specauto" />
			</c:if>
			<c:if test="${step160Data.testResult=='Pass'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_PASS %>" checked><fmt:message key="label.common.pass" />
			</c:if>
			<c:if test="${step160Data.testResult!='Pass'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_PASS %>" ><fmt:message key="label.common.pass" />
			</c:if>
			<c:if test="${step160Data.testResult=='Waive'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_WAIVE %>" checked><fmt:message key="label.common.waive" />
			</c:if>
			<c:if test="${step160Data.testResult!='Waive'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_WAIVE %>" ><fmt:message key="label.common.waive" />
			</c:if>
			<c:if test="${step160Data.testResult=='Fail'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_FAILURE %>" checked><fmt:message key="label.common.fail" />
			</c:if>
			<c:if test="${step160Data.testResult!='Fail'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_FAILURE %>" ><fmt:message key="label.common.fail" />
			</c:if>
		</td>
	</tr>
</table>
</c:if>

<c:if test="${empty step160}">
<table width="100%">
	<tr>
		<td width="50%">
			<strong>Step 160 Testing 封装后点测 (MPI: ZY-60-086)</strong>
			<shiro:hasPermission name="process:edit">
			<c:if test="${empty step160 && empty View}">
			&nbsp;&nbsp;
			<a href="./sedit.o?productId=<c:out value='${product.id}'/>&step=step160">
				<fmt:message key="Edit" />
			</a>
			</c:if>
			</shiro:hasPermission>
		</td>
		<td width="25%">
			<strong>测试用光源编号:<c:out value="${step160Data.testLightCode}" /></strong>
		</td>
		<td width="25%">
			<strong>测试用光功率编号:<c:out value="${step160Data.testLightPowerCode}" /></strong>
		</td>
	</tr>
</table>
<table rules="all" width="100%">
	<tr>
		<td align="center">
		</td>
		<td align="center">
			T-IL/PDL
		</td>
		<td align="center">
			R-IL-L/PDL
		</td>
		<td align="center">
			R-IL-R/PDL
		</td>
		<td align="center">
			Operator
		</td>
		<td align="center">
			Date
		</td>
	</tr>
	<tr>
		<td align="center">
			23度
		</td>
		<td align="center">
			<c:out value="${step160Data.tilPdl}" />
		</td>
		<td align="center">
			<c:out value="${step160Data.rillPdl}" />
		</td>
		<td align="center">
			<c:out value="${step160Data.rilrPdl}" />
		</td>
		<td align="center">
			<c:out value="${step160Data.operator}" />
		</td>
		<td align="center">
			<fmt:formatDate  value="${step160Data.date}" pattern="yyyy-MM-dd HH:mm"/>
		</td>
	</tr>
</table>
<table width="100%">
	<tr>
		<td align="right">
			测试结果:
			<c:out value="${step160Data.testResult}" />
		</td>
	</tr>
</table>
</c:if>
</c:forEach>


